﻿namespace Serializator.JSONObjects
{
    using System;

    /// <summary>
    /// Wrapper class for arrays
    /// </summary>
    public class JSONArrayObject : JSONObject
    {
        #region Properties

        /// <summary>
        /// Get serialized data
        /// </summary>
        public override string EncodedStream()
        {
            string temp = "[";
            foreach (JSONObject child in this.m_list)
            {
                temp += String.Format("{0}, ", child.EncodedStream());
            }
            temp = temp.Remove(temp.Length - 2, 2) + "]";

            return temp;

        }

        #endregion
    }
}
